import { Tabs } from 'expo-router';
import { Ionicons } from '@expo/vector-icons';  // 使用 Ionicons 图标库

export default function TabsLayout() {
    return (
        <Tabs screenOptions={{
            tabBarActiveTintColor: 'rgb(151,206,53)',
            tabBarInactiveTintColor: 'grey',
            headerShown: false
        }}>
            <Tabs.Screen name="home" options={{
                title: "首页",
                headerShown:false,
                tabBarIcon: ({ color, size }) => (
                    <Ionicons name="home" size={size} color={color} />
                )
            }} />
            <Tabs.Screen name="cate" options={{
                title: "分类",
                headerShown:false,
                tabBarIcon: ({ color, size }) => (
                    <Ionicons name="grid" size={size} color={color} />
                )
            }} />
            <Tabs.Screen name="cart" options={{
                title: "购物车",
                headerShown: true,
                headerStyle: { backgroundColor: 'rgb(151,206,53)', },
                headerTintColor: 'white',
                headerTitleAlign: "center",
                tabBarIcon: ({ color, size }) => (
                    <Ionicons name="cart" size={size} color={color} />
                )
            }} />
            <Tabs.Screen name="my" options={{
                title: "我的",

                tabBarIcon: ({ color, size }) => (
                    <Ionicons name="person" size={size} color={color} />
                )
            }} />
            
        </Tabs>
    );
}
